package com.bootdo.clouddoadmin.controller;

import com.bootdo.clouddoadmin.rpc.TestRpc;
import com.bootdo.clouddocommon.annotation.Log;
import com.bootdo.clouddocommon.utils.R;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Iterator;
import java.util.Map;

/**
 *
 *
 * */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    TestRpc testRpc;



    @RequiresPermissions("system:test:test")
    @GetMapping("test")
    String test1() {

        System.out.println("--------------test-----------------");
        return "1111";
    }



    @RequestMapping("/test1")
    @ResponseBody
    R test(@RequestParam Map<String, Object> params) {
        // 存在，不通过，false
        System.out.println("--------------test1-----------------");
        return R.ok("测试");
    }

    @RequestMapping("/test2")
    @ResponseBody
    R test2() {
        // 存在，不通过，false
        System.out.println("--------------test2-----------------");
        return R.ok("测试");
    }


}
